package cn.tac.test.spring.aop.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author : tac
 * @date : 16/04/2017
 */

public class Audience {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    public void beforePerform(){
        logger.info("the audience are applaud for the actor");
    }

    public void afterPerform(){
        logger.info("the audience are applaud for the performance");
    }

    public void aroundPerform(ProceedingJoinPoint joinPoint, String arg2,  String name){
        logger.info("the audience are applaud for the actor~");

        try {
            joinPoint.proceed();
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        logger.info("the audience are applaud for the performance~");
    }

}
